package com.imooc.mall.model.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 增加分类请求 类
 */

@Data
public class UpdateCategoryReq {
    @NotNull(message = "id 不能为空")
    private Integer id;
    @Size(min = 2, max = 5, message = "分类名称 在 2-5 个字符之间")
    private String name;
    @Max(value = 3,message = "类型不能超过 3")
    private Integer type;
    @NotNull(message = "父类ID不能为空")
    private Integer parentId;
    @NotNull(message = "订单号不能为空")
    private Integer orderNum;

    private Date createTime;

    private Date updateTime;
}
